package com.cfx.exercise_43;

import java.lang.reflect.Field;

//注解解释器
public class TestAnno {

	public static void main(String[] args) {
		
		TestAnno.getEmployeeInfo(Employee.class);
		
	}
	
	public static void getEmployeeInfo(Class<?> clazz){
		
		Field[] fields = clazz.getDeclaredFields();
		for (Field field : fields) {
			Profession annotation = field.getAnnotation(Profession.class);
			if(annotation!= null){
				System.out.println(annotation.profession().toString());
			}
			
			
		}
		
		
	}
}
